<template>
  <hzhy-data-table ref="dataTable" v-bind="tableConfigTask"></hzhy-data-table>
</template>

<script>
import * as api from '@/const/api'

export default {
  title: '访问记录列表',
  name: 'RecordList',
  components: {},
  data() {
    return {
      roleConfigVisible: '',
      currentRow: {},
    }
  },
  computed: {
    tableConfigTask() {
      return {
        url: api.accessRecordPage,
        customQuery: {
          userType: 1,
        },
        columns: [
          {
            label: '序号',
            type: 'index',
            prop: 'index',
            fixed: 'left',
          },
          {
            label: 'ip',
            prop: 'ip',
          },
          {
            label: '终端设备',
            prop: 'device',
          },
          {
            label: '浏览器',
            prop: 'browser',
          },
          {
            label: '操作系统',
            prop: 'os',
          },
          {
            label: '国家',
            prop: 'country',
          },
          {
            label: '城市',
            prop: 'city',
          },
          {
            label: '页面路径',
            prop: 'pagePath',
          },
          {
            label: '业务类型',
            prop: 'type',
            formatter: ({ type }) => {
              const map = {
                1: '解决方案',
                2: '产品',
                3: '新闻',
              }
              return map[type]
            },
          },
          {
            label: '业务id',
            prop: 'bizId',
          },
          {
            label: 'oneId',
            prop: 'oneId',
          },
          {
            label: '来源',
            prop: 'fromSource',
            formatter: ({ type }) => '官网',
          },
          {
            label: '访问时间',
            prop: 'createTime',
            minWidth: 170,
          },
        ],
        searchForm: [],
      }
    },
  },
  methods: {},
}
</script>

<style lang="less" scoped></style>
